from django.db import models
# from django.db.models import F

# Create your models here.


class UserFeedback(models.Model):
	class Meta:
		verbose_name_plural = '所有反馈'
		db_table = "user_feedback"
		managed = False

	user_account_id = models.BigIntegerField("用户id",null=True)
	content = models.CharField("反馈内容",null=True,max_length=250)
	tag = models.CharField("标签",null=True,max_length=255)
	contact_way = models.CharField("联系方式",null=True,max_length=50)
	platform = models.CharField("反馈平台",null=True,max_length=50)
	course_id = models.BigIntegerField("课程名称",null=True)
	learn_plan_id = models.BigIntegerField("计划id",null=True)
	feedback_type = models.CharField("反馈类型",null=True,max_length=20)
	gmt_create = models.DateTimeField("创建时间",null=True)
	gmt_modified = models.DateTimeField("修改时间",null=True)
	# feedback_content = models.TextField("回复内容",null=True)
	# def __str__(self):
	# 	return self.user_account_id


class UserFeedbackTag(models.Model):
	class Meta:
		db_table = "user_feedback_tag"
		verbose_name_plural = '标签'
		managed = False

	id = models.AutoField(primary_key=True)
	tag_name = models.CharField(null=True,max_length=50)
	# user_feedback_id = models.BigIntegerField(null=True)
	# user_feedback = models.ForeignKey(UserFeedback)

	def __str__(self):
		return self.tag_name
